home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / udisks.prerm < prev    next >
Encoding:
Text File  |  2010-09-27  |  432 b   |  19 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. get_pid() {
  6.     [ -n "$1" ] || return 0
  7.     [ -S /var/run/dbus/system_bus_socket ] || return 0
  8.  
  9.     dbus-send --system --dest=org.freedesktop.DBus --print-reply \
  10.               /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
  11.               string:$1 2>/dev/null | awk '/uint32/ {print $2}'
  12. }
  13.  
  14. if [ "$1" = "remove" ]; then
  15.     kill $(get_pid org.freedesktop.UDisks) 2>/dev/null || true
  16. fi
  17.  
  18.  
  19.